package com.lagouedu.config;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class TaskConfig implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {

        // 监控线程
        Thread thread = new Thread(new MonitorTask());
        thread.start();
    }
}
